home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Full / Paragon Drive Backup 9 / DB90_SE_x64.msi / Data1.cab / _16CB8BE69DCC4714A0563E858AE869BA < prev    next >
Extensible Markup Language  |  2008-06-28  |  6KB  |  258 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.     <xsl:output method="html" version="4.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>
  4.     <xsl:template match="/wipereport">
  5.         <table width="100%" border="0">
  6.             <!-- Hdd Info -->
  7.             <xsl:apply-templates select="hddinfo"/>
  8.             <!-- General Info -->
  9.             <xsl:apply-templates select="operation"/>
  10.             <!-- Algorithm Info -->
  11.             <xsl:apply-templates select="algorithm"/>
  12.             <!-- Bad Blocks Info -->
  13.             <xsl:apply-templates select="badblocks"/>
  14.         </table>
  15.     </xsl:template>
  16.     <xsl:template match="hddinfo">
  17.         <tr>
  18.             <td colspan="2">
  19.                 <nobr>
  20.                     <h2>QT_TRANSLATE_NOOP("QObject", "Hard Disk Info")</h2>
  21.                 </nobr>
  22.             </td>
  23.         </tr>
  24.         <tr>
  25.             <td valign="center" colspan="2">
  26.                 <img src="hline_gray"/>
  27.             </td>
  28.         </tr>
  29.         <tr>
  30.             <td>
  31.                 <nobr>
  32.                     <b>QT_TRANSLATE_NOOP("QObject", "Hard Disk")</b>
  33.                 </nobr>
  34.             </td>
  35.             <td>
  36.                 <xsl:value-of select="name"/>
  37.             </td>
  38.         </tr>
  39.         <xsl:if test="string-length(serial) != 0">
  40.             <tr>
  41.                 <td>
  42.                     <nobr>
  43.                         <b>QT_TRANSLATE_NOOP("QObject", "Serial Number")</b>
  44.                     </nobr>
  45.                 </td>
  46.                 <td>
  47.                     <xsl:value-of select="serial"/>
  48.                 </td>
  49.             </tr>
  50.         </xsl:if>
  51.         <tr>
  52.             <td>
  53.                 <nobr>
  54.                     <b>QT_TRANSLATE_NOOP("QObject", "Capacity")</b>
  55.                 </nobr>
  56.             </td>
  57.             <td>
  58.                 <xsl:value-of select="capasity"/>
  59.             </td>
  60.         </tr>
  61.     </xsl:template>
  62.     <xsl:template match="operation">
  63.         <tr>
  64.             <td colspan="2"/>
  65.         </tr>
  66.         <tr>
  67.             <td colspan="2">
  68.                 <nobr>
  69.                     <h2>QT_TRANSLATE_NOOP("QObject", "General Info")</h2>
  70.                 </nobr>
  71.             </td>
  72.         </tr>
  73.         <tr>
  74.             <td valign="center" colspan="2">
  75.                 <img src="hline_gray"/>
  76.             </td>
  77.         </tr>
  78.         <tr>
  79.             <td>
  80.                 <nobr>
  81.                     <b>QT_TRANSLATE_NOOP("QObject", "Object")</b>
  82.                 </nobr>
  83.             </td>
  84.             <td>
  85.                 <xsl:value-of select="object"/>
  86.             </td>
  87.         </tr>
  88.         <tr>
  89.             <td>
  90.                 <nobr>
  91.                     <b>QT_TRANSLATE_NOOP("QObject", "Free Space Only")</b>
  92.                 </nobr>
  93.             </td>
  94.             <td>
  95.                 <xsl:choose>
  96.                     <xsl:when test="object/@onlyFreeSpace=1">QT_TRANSLATE_NOOP("QObject", "Yes")</xsl:when>
  97.                     <xsl:otherwise>QT_TRANSLATE_NOOP("QObject", "No")</xsl:otherwise>
  98.                 </xsl:choose>
  99.             </td>
  100.         </tr>
  101.         <tr>
  102.             <td>
  103.                 <nobr>
  104.                     <b>QT_TRANSLATE_NOOP("QObject", "Start Time")</b>
  105.                 </nobr>
  106.             </td>
  107.             <td>
  108.                 <xsl:value-of select="starttime"/>
  109.             </td>
  110.         </tr>
  111.         <tr>
  112.             <td>
  113.                 <nobr>
  114.                     <b>QT_TRANSLATE_NOOP("QObject", "End Time")</b>
  115.                 </nobr>
  116.             </td>
  117.             <td>
  118.                 <xsl:value-of select="finishtime"/>
  119.             </td>
  120.         </tr>
  121.     </xsl:template>
  122.     <xsl:template match="algorithm">
  123.         <tr>
  124.             <td colspan="2"/>
  125.         </tr>
  126.         <tr>
  127.             <td colspan="2">
  128.                 <nobr>
  129.                     <h2>QT_TRANSLATE_NOOP("QObject", "Algorithm Info")</h2>
  130.                 </nobr>
  131.             </td>
  132.         </tr>
  133.         <tr>
  134.             <td valign="center" colspan="2">
  135.                 <img src="hline_gray"/>
  136.             </td>
  137.         </tr>
  138.         <tr>
  139.             <td>
  140.                 <nobr>
  141.                     <b>QT_TRANSLATE_NOOP("QObject", "Name")</b>
  142.                 </nobr>
  143.             </td>
  144.             <td>
  145.                 <xsl:value-of select="name"/>
  146.             </td>
  147.         </tr>
  148.         <tr>
  149.             <td>
  150.                 <nobr>
  151.                     <b>QT_TRANSLATE_NOOP("QObject", "Description")</b>
  152.                 </nobr>
  153.             </td>
  154.             <td>
  155.                 <xsl:value-of select="description"/>
  156.             </td>
  157.         </tr>
  158.         <tr>
  159.             <td>
  160.                 <nobr>
  161.                     <b>QT_TRANSLATE_NOOP("QObject", "Write Pass Count")</b>
  162.                 </nobr>
  163.             </td>
  164.             <td>
  165.                 <xsl:value-of select="writepass"/>
  166.             </td>
  167.         </tr>
  168.         <tr>
  169.             <td>
  170.                 <nobr>
  171.                     <b>QT_TRANSLATE_NOOP("QObject", "Verify Pass Count")</b>
  172.                 </nobr>
  173.             </td>
  174.             <td>
  175.                 <xsl:value-of select="verifypass"/>
  176.             </td>
  177.         </tr>
  178.         <tr>
  179.             <td>
  180.                 <nobr>
  181.                     <b>QT_TRANSLATE_NOOP("QObject", "Verify Percent")</b>
  182.                 </nobr>
  183.             </td>
  184.             <td>
  185.                 <xsl:value-of select="verifyPercent"/>
  186.             </td>
  187.         </tr>
  188.     </xsl:template>
  189.     <xsl:template match="badblocks">
  190.         <tr>
  191.             <td colspan="2"/>
  192.         </tr>
  193.         <tr>
  194.             <td colspan="2">
  195.                 <nobr>
  196.                     <h2>QT_TRANSLATE_NOOP("QObject", "Bad Blocks Info")</h2>
  197.                 </nobr>
  198.             </td>
  199.         </tr>
  200.         <tr>
  201.             <td valign="center" colspan="2">
  202.                 <img src="hline_gray"/>
  203.             </td>
  204.         </tr>
  205.         <tr>
  206.             <td>
  207.                 <nobr>
  208.                     <b>QT_TRANSLATE_NOOP("QObject", "Total Bad Blocks")</b>
  209.                 </nobr>
  210.             </td>
  211.             <td>
  212.                 <xsl:value-of select="count"/>
  213.             </td>
  214.         </tr>
  215.         <xsl:variable name="badblocks" select="list/badblock"/>
  216.         <xsl:choose>
  217.             <xsl:when test="count($badblocks) > 0">
  218.                 <tr>
  219.                     <td>
  220.                         <nobr>
  221.                             <b>QT_TRANSLATE_NOOP("QObject", "List")</b>
  222.                         </nobr>
  223.                     </td>
  224.                     <td>
  225.                         <xsl:call-template name="badblocklist">
  226.                             <xsl:with-param name="badblocks" select="$badblocks"/>
  227.                         </xsl:call-template>
  228.                     </td>
  229.                 </tr>
  230.             </xsl:when>
  231.         </xsl:choose>
  232.     </xsl:template>
  233.     <xsl:template name="badblocklist">
  234.         <xsl:param name="badblocks"/>
  235.         <xsl:choose>
  236.             <xsl:when test="count($badblocks) > 1">
  237.                 <xsl:variable name="head" select="$badblocks[1]"/>
  238.                 <xsl:variable name="tail">
  239.                     <xsl:call-template name="badblocklist">
  240.                         <xsl:with-param name="badblocks" select="$badblocks[position() != 1]"/>
  241.                     </xsl:call-template>
  242.                 </xsl:variable>
  243.                 <xsl:choose>
  244.                     <xsl:when test="$tail">
  245.                         <xsl:value-of select="concat($head, ', ', $tail)"/>
  246.                     </xsl:when>
  247.                     <xsl:otherwise>
  248.                         <xsl:value-of select="$head"/>
  249.                     </xsl:otherwise>
  250.                 </xsl:choose>
  251.             </xsl:when>
  252.             <xsl:when test="count($badblocks) = 1">
  253.                 <xsl:value-of select="$badblocks[1]"/>
  254.             </xsl:when>
  255.         </xsl:choose>
  256.     </xsl:template>
  257. </xsl:stylesheet>
  258.